<div class="dialog-top-bar" draggable mat-dialog-title>
  <td class="dialog-top-label"><h3>创建用户</h3></td>
</div>
<div mat-dialog-content [style.height]="contentHeight">
  <form [formGroup]="userForm" class="form-container" novalidate autocomplete="off">
    <mat-form-field>
      <input formControlName="name" matInput placeholder="请输入账号">
    </mat-form-field>
    <mat-form-field>
      <input formControlName="password" type="password" matInput placeholder="请输入密码">
    </mat-form-field>
    <mat-form-field>
      <input formControlName="password1" type="password" matInput placeholder="请确认密码">
    </mat-form-field>
    <mat-form-field>
      <input formControlName="desc" matInput placeholder="请输入姓名">
    </mat-form-field>
    <mat-form-field>
      <input formControlName="tel" matInput placeholder="请输入联系方式">
    </mat-form-field>
    <mat-form-field>
      <input formControlName="email" matInput placeholder="请输入电子邮箱">
    </mat-form-field>
    <mat-form-field>
      <mat-select formControlName="role" placeholder="请选择角色">
        <mat-option value="USER">用户</mat-option>
        <mat-option value="ADMIN">管理员</mat-option>
      </mat-select>
    </mat-form-field>
  </form>
</div>
<div mat-dialog-actions>
  <button mat-button (click)="submit()" [disabled]="!userForm.valid">提交</button>
  <button mat-button (click)="dialogRef.close(null)">取消</button>
</div>
